package com.zhss.redis.expire;

import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.Jedis;

/**
 * @Description TODO
 * @Author winston
 * @DateTime 2021/11/9
 */
public class ExpireDemo {
	HostAndPort hostAndPort = new HostAndPort("121.4.79.149", 6379);
	Jedis jedis = new Jedis(hostAndPort);

	public static void main(String[] args) throws InterruptedException {
		ExpireDemo demo = new ExpireDemo();
		demo.jedis.set("test_key", "test_value");
		demo.jedis.expire("test_key", 10);
		Thread.sleep(11L);
		demo.jedis.get("test_key");
	}


}
